<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
     <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>欠费列表</title>
		<link rel="stylesheet" type="text/css" href="../resource/css/base.css">
		<script type="text/javascript" src="../resource/js/ExcelExporter.js"></script>
		<s:actionmessage />
		<script type="text/javascript">
		function doFun(method){
			if(method == 'cls'){
				parent.ClosePop();
			}else if(method == "exp"){
				var data = {
					table : "oweFeeDetail",
					title : document.getElementById('clientName').value + '欠费明细表'
				};
				var excelExporter = new ExcelExporter();
				excelExporter.init();
				excelExporter.getDate(data);
				excelExporter.toExcel();
			}else{
				window.print();
			}
		}
		</script>
		<style>
			<!--
			.edittb input{
				width: 92%;
			}
			.edittb input.notext{
				width: auto;
			}
			.coln{width: 30%;}
			.edittb input{
				width: 92%;
			}
			.edittb select{
				width: 92%;
			}
			.edittb textarea{
				width: 97%;
			}
			-->
		</style>
	</head>
	<body  oncontextmenu="return false;" leftmargin="3" topmargin="8" style="overflow-x: visible;overflow-y: auto;">
		<s:hidden name="clientName" id="clientName"/>
		<!--  搜索表单  -->
		<table id="oweFeeDetail" class="edittb" cellpadding="2" cellspacing="1" style="overflow: auto;">
			<s:iterator value="list" status="st" id="vo">
				<tr bgcolor="#EEF4EA">
					<td height="30" colspan="8">
						&nbsp;运货信息
						<s:if test="#request.list.size()>1">
							(<s:property value="#st.count"/>)
						</s:if>
					</td>
				</tr>
				<tr>
					<td width="50%" colspan="4" style="text-align: center;" class="colv">
						发&nbsp;货&nbsp;方
						<s:if test='#request.clientType=="s"'>
							<span style="color:red;">*</span>
						</s:if>
					</td>
					<td width="50%" colspan="4" style="text-align: center;" class="colv">
						签&nbsp;收&nbsp;方
						<s:if test='#request.clientType=="r"'>
							<span style="color:red;">*</span>
						</s:if>
					</td>
				</tr>
				<tr>
					<td class="coln">单位名称</td>
					<td colspan="3" class="colv">
						<s:property value="sClientName"/>
					</td>
					<td class="coln">单位名称</td>
					<td colspan="3" class="colv">
						<s:property value="rClientName"/>
						<s:if test="#request.clientType=='r'">
							<span style="color:red;">*</span>
						</s:if>
					</td>
				</tr>
				<tr>
					<td class="coln">发 件 人</td>
					<td class="colv">
						<s:property value="sLinkMan"/>
					</td>
					<td class="coln">联系电话</td>
					<td class="colv">
						<s:property value="sPhone"/>
					</td>
					<td class="coln">签 收 人</td>
					<td class="colv">
						<s:property value="rLinkMan"/>
					</td>
					<td class="coln">联系电话</td>
					<td class="colv">
						<s:property value="rPhone"/>
					</td>
				</tr>
				<tr>
					<td class="coln">单位地址</td>
					<td colspan="3" class="colv">
						<s:property value="sAddress"/>
					</td>
					<td class="coln">单位地址</td>
					<td colspan="3" class="colv">
						<s:property value="rAddress"/>
					</td>
				</tr>
				<tr bgcolor="#EEF4EA">
					<td height="30" colspan="8">&nbsp;货物信息</td>
				</tr>
				<tr>
					<td class="coln">货物名称</td>
					<td colspan="3" class="colv">
						<s:property value="cargoName"/>
					</td>
					<td class="coln">货物规格</td>
					<td colspan="3" class="colv">
						<s:property value="cargoNorm"/>
					</td>
				</tr>
				<tr>
					<td class="coln">货物数量</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="cargoQuantity"/></s:text>
					</td>
					<td class="coln">单　　价</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="unitPrice"/></s:text>
					</td>
					<td class="coln">发货日期</td>
					<td class="colv">
						<s:date name="sTime" format="yyyy-MM-dd"/>
					</td>
					<td class="coln"></td>
					<td class="colv">
						<s:date name="rTime" format="yyyy-MM-dd"/>
					</td>
				</tr>
				<tr bgcolor="#EEF4EA">
					<td height="30" colspan="8">&nbsp;运费概况</td>
				</tr>
				<tr>
					<td class="coln">总&nbsp;运&nbsp;费</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="totalFee"/></s:text>
					</td>
					<td class="coln">付费方式</td>
					<td class="colv">
						<s:if test="#vo.chargeType==0">
							双方付款
						</s:if>
						<s:elseif test="#vo.chargeType==1">
							发货方付款
						</s:elseif>
						<s:else>
							签收方付款
						</s:else>
					</td>
					<td class="coln" nowrap="nowrap">应收运费</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="oweFee"/></s:text>
					</td>
					<td class="coln">实收运费</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="realPayFee"/></s:text>
					</td>
				</tr>
				<tr>
					<td class="coln" nowrap="nowrap">上次实收费</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="lastCharge"/></s:text>
					</td>
					<td class="coln">收费日期</td>
					<td class="colv">
						<s:if test="#vo.lastChargeDate!=null">
							<s:date name="lastChargeDate" format="yyyy-MM-dd"/>
						</s:if>
						<s:else>-</s:else>
					</td>
					<td class="coln" nowrap="nowrap">本期应收费</td>
					<td class="colv">
						<s:text name="format.number"><s:param value="nextCharge"/></s:text>
					</td>
					<td class="coln">收费日期</td>
					<td class="colv">
						<s:if test="#vo.nextChargeDate!=null">
							<s:date name="nextChargeDate" format="yyyy-MM-dd"/>
						</s:if>
						<s:else>-</s:else>
					</td>
				</tr>
			</s:iterator>
		</table>
		<div style="position:absolute; top: 15px; right: 30px;">
			<a href="javascript:doFun('prt');" class="coolbg">打印</a>
			<a href="javascript:doFun('exp');" class="coolbg">导出Excel</a>
			<a href="javascript:doFun('cls');" class="coolbg">取消</a>
		</div>
	</body>
</html>